<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:th="http://www.thymeleaf.org"
>
<head th:include="common/common :: jscss">
    <title>试点配置/渠道配置</title>
</head>
<style>
    .layui-table-cell {
        height: inherit;
    }
</style>
<body>
<div class="layui-fluid">

    <blockquote class="layui-crumb">
        试点配置/渠道配置
    </blockquote>

    <div class="layui-card">
        <div class="layui-split">&nbsp;</div>
        <form method="post" action="" class="layui-form" lay-filter="zmn-form">
            <div class="layui-card-header layui-margin-b"><b>基本信息</b></div>
            <!--配置id-->
            <div class="layui-form-item" th:if="${channelPriceVO.channelPriceId > 0}">
                <label class="layui-form-label">ID：</label>
                <div class="layui-input-block" style="width: 50%;">
                    <div class="layui-form-mid">
                        <span th:text="${channelPriceVO.channelPriceId}">ID</span>
                    </div>
                </div>
            </div>
            <!--试点类型-->
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">试点类型</label>
                <div class="layui-input-block" style="width: 50%;">
                    <select name="type" id="type" lay-verify="required" disabled="disabled" lay-search>
                        <option value="">请选择</option>
                        <option th:each="type:${typeList}" th:value="${type.key}"
                                th:text="${type.value}"
                                th:selected="${type.key == channelPriceVO.type}"/>
                    </select>
                </div>
            </div>
            <!--选择渠道-->
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">
                    请选择渠道
                </label>
                <div class="layui-input-block" style="width: 50%;">
                    <select name="channelId" id="channelId" lay-filter="channelId" lay-verify="required"
                            disabled="disabled" lay-search
                            th:value="${channelPriceVO.channelId}">
                        <option value="">请选择</option>
                        <option th:each="channel:${channelList}" th:value="${channel.channelId}"
                                th:text="${channel.name}"
                                th:selected="${channel.channelId == channelPriceVO.channelId}"/>
                    </select>
                </div>
            </div>
            <!--执行城市-->
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">执行城市</label>
                <div class="layui-input-inline">
                    <select name="provinceId" id="provinceId" lay-filter="provinceId" lay-search disabled>
                        <option value="0">省份</option>
                        <option th:each="province:${baseAreaList}" th:value="${province.value}"
                                th:text="${province.text}"/>
                    </select>
                </div>
                <div class="layui-input-inline">
                    <select name="cityId" id="cityId" lay-filter="cityId" lay-search disabled>
                        <option value="0">城市</option>
                    </select>
                </div>
                <button class="layui-btn layui-btn-disabled" id="addCity" disabled>添加</button>
            </div>
            <!--展示执行城市-->
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block" style="width: 50%;">
                    <div style="min-height: 100px;border: 1px solid #ccc;padding: 10px;"
                         id="addCityDiv">
                    </div>
                </div>
            </div>
            <!--不执行城市-->
            <div class="layui-form-item">
                <label class="layui-form-label">不执行城市</label>
                <div class="layui-input-inline">
                    <select name="provinceId1" id="provinceId1" lay-filter="provinceId1" lay-search disabled>
                        <option value="0">省份</option>
                        <option th:each="province:${baseAreaList}" th:value="${province.value}"
                                th:text="${province.text}"/>
                    </select>
                </div>
                <div class="layui-input-inline">
                    <select name="cityId1" id="cityId1" lay-filter="cityId1" lay-search disabled>
                        <option value="0">城市</option>
                    </select>
                </div>
                <button class="layui-btn layui-btn-disabled" id="addCity1" disabled>添加</button>
            </div>
            <!--展示不执行城市-->
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block" style="width: 50%;">
                    <div style="min-height: 100px;border: 1px solid #ccc;padding: 10px;"
                         id="addCityDiv1">

                    </div>
                </div>
            </div>
            <!--选择支付方式-->
            <zmn th:if="${channelPriceVO.type == 1}">
                <div class="layui-form-item">
                    <label class="layui-form-label">选择支付方式</label>
                    <div class="layui-input-block">
                        <input th:each="payType:${payTypeList}" type="radio" name="payType" th:value="${payType.key}"
                               disabled
                               th:checked="${payType.key == channelPriceVO.payType}" th:title="${payType.value}"
                               lay-verify="required">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">是否设置定金</label>
                    <div class="layui-input-block">
                        <input type="radio" th:each="deposit:${depositList}" name="depositStatus"
                               lay-filter="depositStatus" th:value="${deposit.key}" th:title="${deposit.value}"
                               lay-verify="required" th:checked="${deposit.key} == ${channelPriceVO.depositStatus}"
                               disabled>
                    </div>
                </div>

                <div id="depositBlock" th:if="${channelPriceVO.depositStatus == 2}">
                    <div class="layui-form-item">
                        <label class="layui-form-label">定金</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" name="deposit"
                                   id="deposit"
                                   placeholder="请输入正整数，100以内" lay-verify="maxSix" disabled
                                   title="设置定金">
                        </div>
                        <span> 元 <span style="color: #9F9F9F;"> 如不设置定金执行支付原价</span></span>
                    </div>
                </div>
            </zmn>
        </form>
    </div>
    <div class="layui-card">
        <div class="layui-card-header" style="margin-top:10px;"><b>操作日志</b></div>
        <div class="layui-split">&nbsp;</div>
        <table class="layui-hide layui-table-cell" id="zmn-channel-price-log-table"
               lay-filter="zmn-channel-price-log-table"></table>
    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    let json = {
        channelPriceVO: [[${channelPriceVO}]],
        onePriceList: [[${onePriceList}]],
        basePriceList: [[${basePriceList}]]
    };
    layui.config({
        version: 201908070942,
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        channel_price_detail_js: "pilot/zmn.plat.channel.price.detail"
    }).use(['index', 'channel_price_detail_js']);
</script>
</body>
</html>